package com.cskaoyan.bean.wx.goods.vo;

import com.cskaoyan.bean.pojo.*;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.beans.BeanUtils;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * @Classname HomeIndexVo
 * @Description
 * @Date 2021/8/15 0:11
 * @Author : xujun
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class HomeIndexVo {

    List<AdIndexVo> banner;             // 广告
    List<BrandIndexVo> brandList;
    List<CategoryIndexVo> channel;      // 类目
    List<CouponIndexVo> couponList;     // 优惠券
    List<FloorGoodsVo> floorGoodsList;
    List<GrouponIndexVo> grouponList;   // 团购
    List<GoodsIndexVo> hotGoodsList;
    List<GoodsIndexVo> newGoodsList;
    List<TopicIndexVo> topicList;

    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    public static class CategoryIndexVo {

        String iconUrl;
        Integer id;
        String name;

    }


    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    public static class AdIndexVo {

        Date addTime;
        String content;
        Boolean deleted;
        Boolean enabled;
        Integer id;
        String link;
        String name;
        Integer position;
        Date updateTime;
        String url;

    }

    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    public static class FloorGoodsVo {

//        List<FloorGoodsVoInnerGoodsVo> goodsList;
        List<GoodsIndexVo> goodsList;
        Integer id;
        String name;

//        @Data
//        @NoArgsConstructor
//        @AllArgsConstructor
//        public static class FloorGoodsVoInnerGoodsVo {
//
//            String brief;
//            BigDecimal counterPrice;
//            Integer id;
//            Boolean isHot;
//            Boolean isNew;
//            String name;
//            String picUrl;
//            BigDecimal retailPrice;
//
//        }

    }


    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    public static class GrouponIndexVo {

        List<GrouponIndexGoodsInnerVo> goods;
        Integer groupon_member;
        BigDecimal groupon_price;


        @Data
        @NoArgsConstructor
        @AllArgsConstructor
        public static class GrouponIndexGoodsInnerVo {

            String brief;
            BigDecimal counterPrice;
            Integer id;
            String name;
            String picUrl;
            BigDecimal retailPrice;

        }

    }


    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    public static class CouponIndexVo {

        Short days;
        String desc;
        BigDecimal discount;
        Integer id;
        BigDecimal min;
        String name;
        String tag;

    }



    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    public static class BrandIndexVo {

        String desc;
        BigDecimal floorPrice;
        Integer id;
        String name;
        String picUrl;

    }


    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    public static class TopicIndexVo {

        Integer id;
        String picUrl;
        BigDecimal Price;
        String readCount;
        String subtitle;
        String title;

    }


    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    public static class GoodsIndexVo {

        String brief;
        BigDecimal counterPrice;
        Integer id;
        Boolean isHot;
        Boolean isNew;
        String name;
        String picUrl;
        BigDecimal retailPrice;

    }


}
